<?php
/* SVN FILE: $Id: routes.php 33 2010-01-12 15:15:16Z gigapromoters $ */
/**
 * Short description for file.
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different urls to chosen controllers and their actions (functions).
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) :  Rapid Development Framework (http://www.cakephp.org)
 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @copyright     Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
 * @link          http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.app.config
 * @since         CakePHP(tm) v 0.2.9
 * @version       $Revision: 33 $
 * @modifiedby    $LastChangedBy: gigapromoters $
 * @lastmodified  $Date: 2010-01-12 20:45:16 +0530 (Tue, 12 Jan 2010) $
 * @license       http://www.opensource.org/licenses/mit-license.php The MIT License
 */
foreach(Utility::getAllPlugins() as $plugin)
{
	$pluginRouteFile = APP.DS.'plugins'.DS.$plugin.DS.'config'.DS.'routes.php';
	if(is_file($pluginRouteFile))
	{
		require_once($pluginRouteFile);
	}
}
/**
 * Here, we are connecting '/' (base path) to controller called 'Pages',
 * its action called 'display', and we pass a param to select the view file
 * to use (in this case, /app/views/pages/home.ctp)...
 */
	Router::connect('/', array('controller' => 'listings', 'action' => 'home'));
/**
 * ...and connect the rest of 'Pages' controller's urls.
 */
	Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
	App::import("Vendor","DynamicPageRoutes");
	DynamicPageRoutes::setRoutes();
	Router::parseExtensions('rss');
	//Router::connect('/listings/add',array('controller'=>'listings','action'=>'add',null));
	//Router::connect('/listings/edit/*',array('controller'=>'listings','action'=>'add'));
	
	//Router::connect('/admin/listing_types/add',array('prefix'=>'admin','controller'=>'listing_types','action'=>'add',null));
	//Router::connect('/admin/listing_types/edit/*',array('prefix'=>'admin','controller'=>'listing_types','action'=>'add'));
	?>